﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using Microsoft.Xna.Framework;

namespace Game500.ClientServerCommon.Src
{
  public class Shape
  {
    public string TextureName { get; set; }
    public int Width { get; set; }
    public int Height { get; set; }
    public Vector3 Position { get; set; }
    public Vector2[] Polygon { get; set; }
  }

  public class Map
  {
    public Map()
    {
      Objects = new List<Shape>();
      PlayerStartPositions = new List<PlayerStartPosition>();
    }

    [XmlAttribute(AttributeName = "Name")]
    public string Name { get; set; }

    public int MapWidth { get; set; }
    public int MapHeight { get; set; }
    public int YOffset { get; set; }

    public Guid MapId { get; set; }
    public string Thumbnail { get; set; }
    public List<Shape> Objects { get; set; }
    public int MaxPlayers { get; set; }

    public List<PlayerStartPosition> PlayerStartPositions {get; set;}
  }

  public class PlayerStartPosition
  {
    public Vector3 Position { get; set; }
    public float Rotation { get; set; }
    public bool Flipped { get; set; }
  }
}